import Model from '@/utils/http.js'
const api = new Model()
// 获取 积分运营配置
export function getOperationConfiguration (){
	return api.get({
		url: '/equity/card/donation/getOperationConfiguration'
	})
}

// 精选活动
export function getActivityList(data){
	return api.get({
		url: '/choiceness/activity/v1/list',
		data:data
	})
}

// H5 平台积分商品列表
export function getCommodityList(data){
	return api.get({
		url: '/integral/commodity/v1/list',
		data:data
	})
}

// H5 平台积分商品详情
export function getCommodityInfo(id){
	return api.get({
		url: `/integral/commodity/v1/getInfo/${id}`,
	})
}
// H5 兑换商品 地址
export function getDefaultAddress(id){
	return api.put({
		url: '/mine/center/getDefaultAddress',
	})
}

// H5 用户兑换订单列表
export function getOrderList(data){
	return api.get({
		url: '/customer/change/order/list',
		data:data
	})
}

// H5 平台积分商品详情
export function getOrderInfo(id){
	return api.get({
		url: `/customer/change/order/getInfo/${id}`,
	})
}

// H5设置交易密码
export function setTradePassword(data){
	return api.put({
		url: '/mine/center/setTradePassword',
		data:data
	})
}
// H5修改交易密码
export function updateTradePassword(data){
	return api.put({
		url: '/mine/center/updateTradePassword',
		data:data
	})
}

// 忘记密码 获取登录手机验证码
export function getSmsCode(phone){
	return api.get({
		url: '/mine/center/sms/code',
		data: {
			"phone": phone
		}
	})
}
// 短信验证码验证
export function postSmsVerification(data){
	return api.post({
		url: '/mine/center/sms/verification',
		data:data
	})
}

// H5通过短信验证 设置交易密码
export function setSmsTradePassword(data){
	return api.put({
		url: '/mine/center/setSmsTradePassword',
		data:data
	})
}

// H5 用户地址列表
export function getAddressList(data){
	return api.get({
		url: '/mine/center/address/list',
		data:data
	})
}

// H5 新增 用户地址
export function addAddress(data){
	return api.post({
		url: '/mine/center/address',
		data:data
	})
}

// H5 编辑 用户地址
export function editAddress(data){
	return api.put({
		url: '/mine/center/address',
		data:data
	})
}

// H5 用户地址详情
export function getInfoAddress(id){
	return api.get({
		url: `/mine/center/address/getInfo/${id}`,
		
	})
}
// H5 设置默认 用户地址
export function setDefault(id){
	return api.put({
		url: `/mine/center/setDefault/${id}`,
		
	})
}
// 省市区接口
export function getCommonCity(){
	return api.get({
		url:'/common/v1/city',
	})
}

// H5 兑换商品
export function putCommodityExchange(data){
	return api.put({
		url:'/integral/commodity/v1/exchange',
		data:data
	})
}

// 获取竞猜活动信息（H5）
export function getActivityInfo(id){
	return api.get({
		url:`/guess/activity/${id}`,
	})
}
// 获取用户的当前余额（H5）
export function getCustomerAmount(){
	return api.get({
		url:'/guess/activity/customer/amount',
	})
}

// 查询支持记录列表
export function getBetRecordList(data){
	return api.get({
		url:'/guess/activity/support/bet/record/list',
		data:data
	})
}

export function getEventsRank(id){
	return api.get({
		url:`/guess/activity/support/events/rank/${id}`,
	})
}

// 查询支持竞猜活动比赛时间列表
export function getEventsTimeList(data){
	return api.get({
		url:'/guess/activity/support/events/time/list',
		data:data
	})
}

// 查询支持竞猜活动比赛时间列表
export function getEventsList(data){
	return api.get({
		url:'/guess/activity/support/events/list',
		data:data
	})
}

// 查询冠军竞猜投注对象列表
export function getChampionTeamList(id){
	return api.get({
		url:`/guess/activity/champion/team/list/${id}`,
	})
}

// 查询支持记录列表
export function getChampionRecordList(data){
	return api.get({
		url:'/guess/activity/champion/bet/record/list',
		data:data
	})
}

//竞猜交易支付
export function getActivitySupportPay(data){
	return api.post({
		url:'/guess/activity/support/pay',
		data:data
	})
}
// 冠军竞猜交易支付
export function getActivityChampionPay(data){
	return api.post({
		url:'/guess/activity/champion/pay',
		data:data
	})
}

// 查询合成列表下拉框
export function castingSelect(data){
	return api.get({
		url:'/shenye/casting/activity/select',
        data
	})
}
//查询合成活动详情
export function castingDetail(id){
	return api.get({
		url:`/shenye/casting/activity/detail/${id}`,
	})
}
//铸造数字权益卡
export function payCasting(data){
	return api.post({
		url:`/shenye/casting/activity/casting`,
        data
	})
}

//查询熔炉列表下拉框
export function destroySelect(params){
	return api.get({
		url:'/shenye/destroy/activity/select',
        data:params
	})
}
//查询熔炼活动详情
export function destroyDetail(id){
	return api.get({
		url:`/shenye/destroy/activity/detail/${id}`,
	})
}
// 销毁数字权益卡
export function payDestroy(data){
	return api.post({
		url:`/shenye/destroy/activity/destroy`,
        data
	})
}
//查询NFR详情
export function getCardId(id){
	return api.get({
		url:`/shenye/casting/activity/equity/card/${id}`,
	})
}

